Ext.application({
    name:"Demo",
    glossOnIcon:'false',

    launch:function(){

        var tabPanel = Ext.create('Ext.TabPanel',{

            id:'tabpanel',
            ui:'dark',
            tabBarPosition:'bottom',
            items:[
                {
                    title:'主页',
                    iconCls:'home',
                    xtype:'panel',
                    layout:{
                      type:'hbox',
                      align:'stretch'
                    },
                    items:[
                        {
                            flex:1,
                            html:'child 1',
                            style:'background-color:pink'
                        },
                        {
                            flex:2,
                            html:'child 2'
                        }
                    ]
                },
                {
                    title:'合同',
                    iconCls:'user',
                    xtype:'panel',
                    layout:'hbox',
                    items:[
                        {
                            id:'item1',
                            flex:1,
                            html:'left',
                            style:'background-color:purple'
                        },{
                            id:'item2',
                            flex:1,
                            html:'right',
                            style:'background-color:green'
                        },{
                            docked:'top',
                            height:20,
                            html:'top container',
                            style:'background-color:pink;text-align:center;'
                        }
                    ]
                }
            ]
        });
        Ext.Viewport.add(tabPanel);
    }

});